<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>个案查重删除</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		function downExcel(){
			top.$.jBox.confirm("确认要导出出入库数据吗？","系统提示",function(v,h,f){
				if(v=="ok"){
					$("#searchForm").attr("action","${ctx}/child/childBaseinfoRepeat/exportExcel");
					$("#searchForm").submit();
				}
			},{buttonsFocus:1});
			top.$('.jbox-body .jbox-icon').css('top','55px');
		}
		
		 function reset(){
				$("#searchForm").reset();
				var selectVal = $("form:select");
				for(var i=0;i<selectVal.lengeth;i++){
					selectVal[i].options[0].selected= true;
				}
		} 
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/child/childBaseinfo/">个案查重删除</a></li>
<%-- 		<shiro:hasPermission name="child:childBaseinfo:edit"><li><a href="${ctx}/child/childBaseinfo/form">个案信息查询添加</a></li></shiro:hasPermission> --%>
	</ul>
	<form:form id="searchForm" modelAttribute="childBaseinfo" action="${ctx}/child/childBaseinfoRepeat/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
	<div class="breadcrumb">
		<table class="table table-bordered">	
			<tr>
				<th>地区名称：</th>
				<td>
					<form:select path="area" class="span2 minWidth">
						<form:option value="" label="--请选择--"/>
						<form:options items="${area}" itemLabel="name" itemValue="code" htmlEscape="false"/>
					</form:select>
<!-- 					<div> -->
<!-- 						&nbsp;&nbsp;<input  class="btn btn-primary" type="button" value="上级"/> -->
<!-- 					</div> -->
				</td>
				<th>导出页码：</th>
				<td><form:input path="startPage" value="1"   htmlEscape="false" maxlength="26" style="width:40px;"/>&nbsp;~
				<form:input path="endPage"   value="1"  htmlEscape="false" maxlength="26" style="width:40px;"/></td>
			</tr>
			<tr>
				<th>重复条件：</th>
				<td>
				  	<div>
						<form:checkbox path="childname" value="1"/>儿童姓名
				  	</div>
				  	<div>
						<form:checkbox path="guardianname" value="1"/>母亲姓名
					</div>
					<div>
						<form:checkbox path="father" value="1"/>父亲姓名
					</div>
					<div>
						<form:checkbox path="orderBy" value="1"/>母亲姓名或父亲姓名
					</div>
					<div>
						<form:checkbox path="otherAttribute" value="1"/>出生日期
					</div>
					<div>
						<form:checkbox path="gender" value="1"/>儿童性别
					</div>
				</td>
				<th>出生日期：</th>
				<td>
					<input name="startBirthday" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
						value="<fmt:formatDate value="${childBaseinfo.birthday}" pattern="yyyy-MM-dd"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>&nbsp;至
					<input name="endBirthday" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
						value="<fmt:formatDate value="${childBaseinfo.birthday}" pattern="yyyy-MM-dd"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
				</td>
			</tr>
		</table>
	</div>
		<ul class="ul-form breadcrumb">
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="btns"><input onclick="reset()"  class="btn btn-primary" type="button" value="重置"/></li>
			<li class="btns"><input onclick="downExcel()"  class="btn btn-primary" type="button" value="导出"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>儿童编码</th>
				<th>免疫卡号</th>
				<th>姓名</th>
				<th>性别 </th>
				<th>出生日期</th>
				<th>母亲姓名</th>
				<th>母亲身份证号</th>
				<th>父亲姓名</th>
				<th>父亲身份证号</th>
				<th>现住址</th>
				<th>居住属性</th>
				<th>在册情况</th>
				<shiro:hasPermission name="child:childBaseinfo:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="childBaseinfo">
			<tr>
				<td> 
					${childBaseinfo.childcode}
				</td>
				<td> 
					${childBaseinfo.vaccNo}
				</td>
				<td>
					${childBaseinfo.childname}
				</td>
				<td>
					${fns:getDictLabel(childBaseinfo.gender, "sex", "")}
				</td>
				<td>
					<fmt:formatDate value="${childBaseinfo.birthday}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					${childBaseinfo.guardianname}
				</td>
				<td>
					${childBaseinfo.guardianidentificationnumber}
				</td>
				<td>
					${childBaseinfo.father}
				</td>
				<td>
					${childBaseinfo.fathercard}
				</td>
				<td>
					${childBaseinfo.address}
				</td>
				
				<td>
					${fns:getDictLabel(childBaseinfo.reside, "reside", "")}
				</td>
				<td>
					${fns:getDictLabel(childBaseinfo.situation, "child_situation", "")}
				</td>
				 
				 
				<shiro:hasPermission name="child:childBaseinfo:edit"><td>
    				<a href="${ctx}/child/childBaseinfo/form?id=${childBaseinfo.id}">合并</a>
<%--     				<a href="${ctx}/child/childBaseinfo/form?id=${childBaseinfo.id}">浏览</a> --%>
    				<a  onclick="window.open('${ctx}/child/childBaseinfoRepeat/getChildBaseinfo?id=${childBaseinfo.id}');" href="#">浏览</a>
					<a href="${ctx}/child/childBaseinfo/delete?id=${childBaseinfo.id}" onclick="return confirmx('确认要删除该个案信息查询吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>